﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Xml;
using System.Xml.Serialization;

namespace RecursosHumanos
{
    public partial class frmPassageiro : Form
    {
        WBGEntities bd = new WBGEntities();

        public frmPassageiro()
        {
            InitializeComponent();
        }

        private void frmFilme_Load(object sender, EventArgs e)
        {

            AtualizaGrid();
        }

        private void AtualizaGrid()
        {
            grd.DataSource = from x in bd.Passageiro
                             select new { x.idPassageiro, x.Pessoa.nome };
            FormataGrid();
        }

        private void FormataGrid()
        {
            grd.Columns[0].HeaderText = "ID";
            grd.Columns[1].HeaderText = "Nome";
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void grd_Click(object sender, EventArgs e)
        {
            try
            {
                //grd.CurrentRow.Cells[0].ToolTipText = FilmeGenero.Find(Convert.ToInt32(grd.CurrentRow.Cells["genero"].Value.ToString()));
            }
            catch { }
        }
    }
}
